<?php
//ini_set("display_errors","On");
//error_reporting(E_ALL);
include 'Image.php';
$Img = new Image();
$product_str_start = 'nba2019-00000155'; 
$product_str_end = 'nba2019-00000160';
$press = explode('-',$product_str_start)[0];
$product_sn_start = explode('-',$product_str_start)[1];
$product_sn_end = explode('-',$product_str_end)[1];
//一共几张图（循环次数）
$count = $product_sn_end - $product_sn_start;
// 生成二维码图片
for ($i=0;$i<=$count;$i++){
    $product_sn = $press.'-'.substr($product_sn_start+$i+1000000,1,7);
    $Img->makeMergerImg($product_sn);
    $img_arr[$i] = 'upload/product_qrcode/'.$product_sn.'.jpg';
}
// 生成压缩包
$Img->makeZip('upload/qrcode-2019.zip',$img_arr);
// 删除图片文件夹文件
$Img->delfiles('upload/product_qrcode');
// 文件下载
$Img->download('upload/qrcode-2019.zip');